<template>
  <div class="sign_type_choose">
    <p class="sign_type_desc">签署{{ fileName }}有两种方式：</p>
    <p class="sign_type_desc">1、直接通过签字板进行签署和保存。</p>
    <p class="sign_type_desc">
      2、打印{{ fileName }}，签署纸质{{ fileName }}后，拍照或扫描上传纸质{{ fileName }}存档
    </p>
    <p class="sign_type_desc">请选择签署方式：
      <el-radio-group v-model="selfSignType" @change="changeSignType()">
        <el-radio :label="1">签字板</el-radio>
        <el-radio :label="2">打印手签</el-radio>
      </el-radio-group>
    </p>
  </div>
</template>

<script>
export default {
  name: "SignTypeChoose",
  props: {
    fileName: {
      type: String,
      default: '知情同意书'
    },
    signType: {
      type: Number,
      default: 1
    }
  },
  data() {
    return {
      selfSignType: 1
    }
  },
  watch: {
    signType(newVal) {
      this.selfSignType = newVal
    }
  },
  mounted(){
    this.selfSignType = this.signType
  },
  methods: {
    changeSignType() {
      this.$emit('changeSignType', this.selfSignType)
    }
  }
}
</script>

<style lang="scss" scoped>
.sign_type_choose{
  background: rgba(24,144,255, 0.1);
  padding: 15px;
  color: #1890ff;
}
</style>